package com.dd.cloud.common.constants;

/**
 * @author zk
 */
public class HealthConstants {

    public interface CommonConstants {
        // 注册短信验证码缓存前缀
        String PHONE_KEY_PREFIX = "user:verify:phone:";
        // 对外开放接口秘钥(固定秘钥)
        String SECRET = "53b324f8fa07dc60566aee5447afccb8";
        //锁库存redisson锁
        String STOCK_REDUCE_LOCK = "stock_reduce_lock_dd";
        //释放库存redisson锁
        String STOCK_REDUCE_UNLOCK = "stock_reduce_unlock_dd";
        //word转pdf模板文件
        String WORD_TO_PDF_TEM = "topdf.ftl";
        //登录信息
        String LOGIN_INFO = "login_info";
    }

    public interface InviteCodePrefixConstants {
        //医生邀请码前缀
        String DOCTOR_PREFIX = "D";
        //代理商邀请码前缀
        String AGENT_PREFIX = "A";
        //销售邀请码前缀
        String SALE_PREFIX = "S";
    }

    /**
     * 服务环境
     *
     * @author vodbook
     */
    public static class ProfilesType {
        // 生产环境
        public static final String PROD = "prod";
        // 测试环境
        public static final String TEST = "test";
        // 开发环境
        public static final String DEV = "dev";
    }

    /**
     * 客户端类型
     *
     * @author vodbook
     */
    public static class ClientType {
        // 医生pc
        public static final String HEALTHPC = "dadaopc";
        // 医生移动
        public static final String HEALTHMOB = "dadaomob";
        // 医生移动
        public static final String HEALTHAPPLET = "dadaoapplet";
        // 机构管理
        public static final String HEALTHMECHAN = "dadaomechan";
        // 运营管理
        public static final String HEALTHADMIN = "dadaoadmin";
        // 药房
        public static final String HEALTHPHAR = "dadaophar";
        // 代理商
        public static final String HEALTHAGENT = "dadaoagent";
        // 销售
        public static final String HEALTHSALES = "dadaosales";
        // 患者客户端
        public static final String HEALTHPATIENT = "dadaopatient";
    }


    /**
     * 客户端失败登录次数 默认5次, 可自定义
     *
     * @author vodbook
     */
    public static class ClientLoginNum {
        // 默认值
        public static final Integer DEFAULT = 5;
    }

    //登录密码错误超过次数的等待时间 分钟
    public static final Integer CLIENT_LOGIN_ERROR_TIME = 3;

    //app登录的有效期 分钟, 15天
    public static final Integer APP_LOGIN_EXPIRE = 21600;
    /**
     * 获取当前客户端的密码能错误次数
     */
    public static Integer getClientLoginErrorNum (String client){
        return ClientLoginNum.DEFAULT;
    }

    /**
     * 机构状态
     *
     * @author vodbook
     */
    public interface MechanStatus {
        //正常
        int NORMAL = 1;
        //运营禁用
        int DISABLEADMIN = 3;
        //删除
        int DEL = -1;
    }
}
